package jax.io;

/**
 * ...
 * @author tom
 */
class JConsole  {
	public function new () {
	}
	public function flush() {
	}
	public function readLine(?f:String):String {
		#if sys
			return Sys.stdin().readLine();
		#elseif js
			return js.Lib.window.prompt("Need input");
		#else
			return "";
		#end
	}
	public function reader() {
		#if sys
		return new JConsoleReader();
		#else
		return null;
		#end
	}
}
#if sys
private class JConsoleReader extends jax.io.JReader {
	public function new() {
		super(Sys.stdin());
	}
}
#end